package com.itheima.service.impl;

import com.itheima.dao.StudentDao;
import com.itheima.dao.impl.StudentDaoImpl;
import com.itheima.daomain.Student;
import com.itheima.service.StudentService;

import java.util.List;

public class StudentServiceImpl implements StudentService {
    private StudentDao studentDao=new StudentDaoImpl();
    @Override
    public List<Student> findAll() throws Exception {
        return studentDao.findAll();
    }

    @Override
    public int update(Student student) throws Exception {
      return   studentDao.update(student);
    }

    @Override
    public int delete(Integer id) throws Exception {
        int delete = studentDao.delete(id);
        return delete;
    }


}
